﻿#region
using System;
using System.ComponentModel;
using System.Windows.Forms;
using DevExpress.XtraEditors;

#endregion

namespace DevTools.AndroidLayoutHelper
{
    public partial class ResultControl : XtraUserControl
    {
        public ResultControl()
        {
            InitializeComponent();
        }

        [DefaultValue(0)]
        public int No { get; set; }

        public string Result
        {
            get { return mmeResult.Text; }
            set { mmeResult.Text = value; }
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            if (DesignMode)
                return;

            btnCopy.Text = string.Format("Copy(&{0})", No);
            lblLabel.Text = string.Format("생성된 코드 {0}", No);
        }

        private void btnCopy_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(mmeResult.Text);
            MainForm.Instance.NotifyMessage("클립보드로 복사하였습니다.");
        }
    }
}